package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.entity.PageResult;
import com.itheima.pojo.Order;
import com.itheima.pojo.OrderSetting;
import org.apache.ibatis.annotations.Param;
import org.aspectj.weaver.ast.Or;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface OrderSettingDao {
    /**
     * 根据日期查询预约信息
     * @param date
     * @return
     */
    List<Map> getOrderSettingsByDate(String date);

    /**
     * 过时得方法
     * @param start
     * @param end
     * @return
     */
    Page<OrderSetting> findData(@Param("start") String start,@Param("end") String end);

    /**
     * 根据日期查询剩余预约信息
     * @param orderDate
     * @return
     */
    OrderSetting findByOrderDate(Date orderDate);


    void add(OrderSetting orderSetting);
    void delete(OrderSetting orderSetting);
    //更新可预约人数
    int editNumberByOrderDate(OrderSetting orderSetting);
    //更新已预约人数
    int editReservationsByOrderDate(OrderSetting orderSetting);


}
